﻿<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:param name="url"/>
  <xsl:param name="fromCache"/>
  <xsl:param name="requestDuration"/>
  <xsl:template match="/">
    <rss version="0.91">
      <channel>
        <title>TEST RSS FEED</title>
        <link>
          <xsl:value-of select="$url"/>
        </link>
        <xsl:for-each select="//table[@id='searchResult']//tr[position()>1]">
          <item>
            <category>
              <xsl:value-of select="./td[1]" />
            </category>
            <title>
              <xsl:value-of select="./td[2]" />
            </title>
            <link>
              <xsl:value-of select="./td[4]/a/@href" />
            </link>
            <uploaded>
              <xsl:value-of select="./td[3]" />
            </uploaded>
            <size>
              <xsl:value-of select="./td[5]" />
            </size>
            <seeds>
              <xsl:value-of select="./td[6]" />
            </seeds>
            <leechers>
              <xsl:value-of select="./td[7]" />
            </leechers>
            <description>
              <xsl:value-of select="../div/text()" />
            </description>
          </item>
        </xsl:for-each>
      </channel>
    </rss>
  </xsl:template>
</xsl:stylesheet>